<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org/extras/spring-security">
<head>
<meta charset="UTF-8"/>
<title>教评系统-登录</title>
<link rel="shortcut icon" th:href="@{../images/favicon.ico}"/>
<link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
<link rel="stylesheet" th:href="@{/css/login.css}"/>
<script th:src="@{/layui/layui.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
</head>
<body>
<div class="login-main">
    <header class="layui-elip">登录</header>
    <form class="layui-form" action="/Teaching_evaluation_system/index" method="post">
        <div class="layui-input-inline">
            <p style="color: red" th:text="${msg}" th:if="${ not #strings.isEmpty(msg)}"></p>
            <input type="text" name="username"  lay-verify="required" placeholder="用户名" autocomplete="off" class="layui-input"/>
        </div>
        <div class="layui-input-inline">
            <input type="password" name="password"  lay-verify="required" placeholder="密码" autocomplete="off" class="layui-input"/>
        </div>
        <div class="layui-col-xs6" ><br>
	      <input style="width: 100px;height: 30px" name="code" type="text" value="" placeholder="请输入验证码" class="input-val"/>
    	</div>
    	<a href="javascript:changeImg();" rel="external nofollow" title="点击更换图片" >
	          <img id="imgs" style="width: 150px;height: 50px" class="verifyCode" src="/Teaching_evaluation_system/getVerifyCode"/>
	    </a><br>
        <br><div class="layui-input-inline login-btn">
            <button type="submit" lay-filter="login" class="layui-btn layui-btn-normal">登录</button>
        </div>
        <div class="layui-input-inline login-btn">
            <a th:href="@{/register}"><button type="button" lay-filter="register" class="layui-btn layui-btn-primary">注册</button></a>
        </div>
        <hr/>
        <div class="layui-form-item">
             <div class="layui-form-item layui-inline" style="margin-bottom: 20px;">
                <input type="checkbox" name="remember" id="remember" lay-skin="primary" title="记住密码"/>
                <div class="layui-form-checkbox" lay-skin="primary"><span>记住密码</span><i class="layui-icon layui-icon-ok"></i></div>
            </div>
	        <div class="layui-inline" style="float: right;">
	             <br><a th:href="@{/reset_frame}" class="fr">忘记密码？</a>
	        </div>
        </div>
    </form>
</div>
</body>
<script>
/* 刷新验证码 */
	function changeImg(){
		document.getElementById("imgs").src = "/Teaching_evaluation_system/getVerifyCode?r=" + Math.random();
}
</script>
</html>